<template>
  <div>
    <h1>parentA</h1>
    <h1>{{ money }}</h1>
    <button @click="addSex">给对象增加一个性别</button>
    <son-a :money="money" :str="str" :obj="obj"></son-a>
  </div>
</template>

<script>
import SonA from "./SonA.vue";
export default {
  data() {
    return {
      money: "100万",
      str: "周一穿正装！！",
      obj: {
        name: "lele",
        height: 190,
      },
    };
  },
  methods: {
    addSex() {
      this.obj.sex = "男";
    },
  },
  components: {
    SonA,
  },
};
</script>

<style lang="scss" scoped>
</style>